/**
 * TrguiNG - next gen remote GUI for transmission torrent daemon
 * Copyright (C) 2023  qu1ck (mail at qu1ck.org)
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published
 * by the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */

.torrent-table-container .th, .torrent-table-container .td {
    padding: 0.05em 0.2em;
    display: flex;
    min-width: 0;
    align-items: center;
}

.torrent-table-container .th {
    cursor: pointer;
}

.torrent-table-container .td {
    cursor: default;
}

.torrent-table-container .th div, .torrent-table-container .td div {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.torrent-label {
    margin-inline: 0.1em;
}

.white-outline {
    box-shadow: 0 0 2px 0 white;
}

.torrent-table-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}

.torrent-table-rows {
    flex-grow: 1;
    position: relative;
    overflow: auto;
}

.torrent-table-rows:focus {
    outline: 0;
}

.torrent-table {
    position: absolute;
    left: 0;
    top: 0;
}

.torrent-table-container .tr {
    display: flex;
    flex-shrink: 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

.torrent-table .tr:nth-child(odd) {
    box-shadow: inset 0 0 0 9999px rgba(133, 133, 133, 0.1);
}

.torrent-table .tr.descendant-selected {
    background-color: rgb(50, 80, 170);
    color: white;
    box-shadow: inset 0 0 0 9999px rgba(133, 133, 133, 0.7);
}

.torrent-table .tr.descendant-selected:nth-child(odd) {
    box-shadow: inset 0 0 0 9999px rgba(133, 133, 133, 0.8);
}

.resizer {
    display: block;
    background: rgba(124, 124, 124, 0.4);
    cursor: col-resize;
    height: 100%;
    /* prevents from scrolling while dragging on touch devices */
    touch-action: none;
    opacity: 0.3;
    width: 2px;
    overflow: visible !important;
}

.resizer.isResizing {
    background: rgba(122, 122, 122, 0.8);
    opacity: 1;
}

.th:hover>.resizer {
    opacity: 1;
    width: 0.3em;
}

.resizer-guide {
    border-right: 1px grey dashed;
    width: 100%;
    height: 10000px;
}